3.170 \(\int \frac {-10+3 x^2}{4-4 x+x^2} \, dx\)

Optimal. Leaf size=21 \[ 3 x+\frac {2}{2-x}+12 \log (2-x) \]

[Out]

2/(2-x)+3*x+12*ln(2-x)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {27, 697} \[ 3 x+\frac {2}{2-x}+12 \log (2-x) \]

Antiderivative was successfully verified.

[In]

Int[(-10 + 3*x^2)/(4 - 4*x + x^2),x]

[Out]

2/(2 - x) + 3*x + 12*Log[2 - x]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {-10+3 x^2}{4-4 x+x^2} \, dx &=\int \frac {-10+3 x^2}{(-2+x)^2} \, dx\\ &=\int \left (3+\frac {2}{(-2+x)^2}+\frac {12}{-2+x}\right ) \, dx\\ &=\frac {2}{2-x}+3 x+12 \log (2-x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 19, normalized size = 0.90 \[ 3 (x-2)-\frac {2}{x-2}+12 \log (x-2) \]

Antiderivative was successfully verified.

[In]

Integrate[(-10 + 3*x^2)/(4 - 4*x + x^2),x]

[Out]

-2/(-2 + x) + 3*(-2 + x) + 12*Log[-2 + x]

________________________________________________________________________________________

fricas [A]  time = 0.78, size = 25, normalized size = 1.19 \[ \frac {3 \, x^{2} + 12 \, {\left (x - 2\right )} \log \left (x - 2\right ) - 6 \, x - 2}{x - 2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3*x^2-10)/(x^2-4*x+4),x, algorithm="fricas")

[Out]

(3*x^2 + 12*(x - 2)*log(x - 2) - 6*x - 2)/(x - 2)

________________________________________________________________________________________

giac [A]  time = 0.17, size = 18, normalized size = 0.86 \[ 3 \, x - \frac {2}{x - 2} + 12 \, \log \left ({\left | x - 2 \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3*x^2-10)/(x^2-4*x+4),x, algorithm="giac")

[Out]

3*x - 2/(x - 2) + 12*log(abs(x - 2))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 18, normalized size = 0.86 \[ 3 x +12 \ln \left (x -2\right )-\frac {2}{x -2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x^2-10)/(x^2-4*x+4),x)

[Out]

3*x+12*ln(x-2)-2/(x-2)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 17, normalized size = 0.81 \[ 3 \, x - \frac {2}{x - 2} + 12 \, \log \left (x - 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3*x^2-10)/(x^2-4*x+4),x, algorithm="maxima")

[Out]

3*x - 2/(x - 2) + 12*log(x - 2)

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 17, normalized size = 0.81 \[ 3\,x+12\,\ln \left (x-2\right )-\frac {2}{x-2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3*x^2 - 10)/(x^2 - 4*x + 4),x)

[Out]

3*x + 12*log(x - 2) - 2/(x - 2)

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 14, normalized size = 0.67 \[ 3 x + 12 \log {\left (x - 2 \right )} - \frac {2}{x - 2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3*x**2-10)/(x**2-4*x+4),x)

[Out]

3*x + 12*log(x - 2) - 2/(x - 2)

________________________________________________________________________________________